package biz.obake.team.touchprotector.lfd;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.ImageView;
import android.widget.LinearLayout;
import androidx.preference.Preference;
import androidx.preference.l;
import biz.obake.team.touchprotector.R;

public class CurrentDesignPreference extends Preference {
    private Drawable Q;

    public CurrentDesignPreference(Context context) {
        super(context);
        F0();
    }

    public CurrentDesignPreference(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        F0();
    }

    public CurrentDesignPreference(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        F0();
    }

    private void F0() {
        z0(R.layout.lfd_current_design_pref_widget);
    }

    public void G0(Drawable drawable) {
        this.Q = drawable;
    }

    public void P(l lVar) {
        super.P(lVar);
        ImageView imageView = (ImageView) lVar.M(R.id.lfd_pref_imageview);
        if (imageView != null) {
            imageView.setImageDrawable(this.Q);
        }
        LinearLayout linearLayout = (LinearLayout) lVar.M(16908312);
        if (linearLayout != null) {
            LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) linearLayout.getLayoutParams();
            layoutParams.width = -2;
            layoutParams.height = -2;
            linearLayout.setLayoutParams(layoutParams);
        }
    }
}
